@w: 300px;
.box1 {
  width: @w;
  height: @w+100;
  height: @w - 100; //使用减法的时候减号必须添加空格，不然会报错
  border: 1px solid red;
  position: relative;
  left: @w*2;
  top: @w/3;
}

@width: 200px;
@height: 600px;
.box2 {
  width: @width;
  height: @height;
  border: 1px solid red;
  div {
    width: @width/2;
    height: @height/2;
    background: green;
    margin: (@height - @height/2)/2 auto 0 auto;
    //~"不编译的命令"--------避免编译
    filter: ~"alpha(opacity:50)";
  }
}